home *** CD-ROM | disk | FTP | other *** search
- #ifndef __ISOTP_ADDR__
- #define __ISOTP_ADDR__
-
- /*
- * General structure for addresses usable by ISO,TCP and X25
- */
-
-
-
- /*
- * O S I T R A N S P O R T P R O V I D E R N A M E S
- */
-
- #define OSI_CLNS_ETHERNET "osi1"
- #define OSI_CONS_X25 "osi2"
- #define OSI_CLNS_TOKENRING "osi3"
-
- /*
- * O S I T R A N S P O R T A D D R E S S F O R M A T
- */
-
-
- /*
- * CLNS:
- * +-+---------------+-+----------+
- * !L! TSEL !L! NSAP ! Full ISO 8473 and ES/IS
- * +-+---------------+-+----------+
- *
- * +-+----------------+-+----------+-+------+
- * !L! TSEL !L! NSAP !L! MAC ! Full ISO 8473
- * +-+----------------+-+----------+-+------+
- *
- * +-+----------------+-+----------+-+------+
- * !L! TSEL !L! !L! MAC ! Null IP (inactive subset)
- * +-+----------------+-+----------+-+------+
- *
- * CONS:
- * +-+----------------+-+----------+-+-+--------+-+----------------+-+---+
- * !L! TSEL !L! NSAP !L!L! X.121 !L! CUD !L!CUG! Use AEF to convey NSAP
- * +-+----------------+-+----------+-+-+--------+-+----------------+-+---+ ( Optionally CUD and/or CUG )
- *
- * +-+----------------+-+----------+-+-+--------+-+----------------+-+---+
- * !L! TSEL !L! !L!L! X.121 !L! CUD !L!CUG! No NSAP, use X.121 address instead
- * +-+----------------+-+----------+-+-+--------+-+----------------+-+---+ ( Optionally CUD and/or CUG )
- */
-
-
-
- /*
- * T S E L ( T r a n s p o r t S E L e c t o r )
- */
- #define cMaxTSELlenInDigit 64
- #define cMaxTSELlenInOctet 32
-
- typedef struct {
- unsigned char len; /* In Semi Octets */
- unsigned char sel[cMaxTSELlenInOctet];
- } TTSEL;
-
-
-
-
- /*
- * N S A P ( N e t w o r k S e r v i c e A c c e s s P o i n t )
- */
- #define cMaxNSAPLenInDigit 40
- #define cMaxNSAPLenInOctet 20
-
- typedef struct {
- unsigned char len; /* In Semi Octets */
- unsigned char addr[cMaxNSAPLenInOctet];
- } TNSAP;
-
-
-
-
-
- /*
- * S N P A
- */
-
-
- /*
- * Subnet specific address format(s)
- */
-
- /*
- * MAC Address Field format
- */
- #define cMACaddrLenInDigit 12 /* MAC address len (in semi octets) */
- #define cMACaddrLenInOctet 6 /* MAC address len (in octets) */
-
- typedef struct {
- unsigned char len; /* In Semi Octets (always 12) */
- unsigned char addr[cMACaddrLenInOctet];
- } TMACaddr;
-
-
- /*
- * X.121 DTE Address Field format
- */
- #define cMaxX121addrLenInDigit 15 /* Max X.121 address len (in semi octets) */
- #define cMaxX121addrLenInOctet 8 /* Max X.121 address len (in octets) */
-
- typedef struct {
- unsigned char len; /* In Semi Octets */
- unsigned char addr[cMaxX121addrLenInOctet];
- } TX121;
-
-
- /*
- * Call User Data format
- */
- #define cMaxCUDlenInDigit 32
- #define cMaxCUDlenInOctet 16
-
- typedef struct {
- unsigned char len; /* In Semi Octets */
- unsigned char data[cMaxCUDlenInOctet];
- } TCUD;
-
- /*
- * Closed User Group format
- */
- #define cMaxCUGlenInDigit 4
- #define cMaxCUGlenInOctet 2
-
- typedef struct {
- unsigned char len; /* In Semi Octets */
- unsigned char data[cMaxCUGlenInOctet];
- } TCUG;
-
-
- /*
- * DTE address (X.121 + CUD + CUG)
- */
- typedef struct {
- TX121 X121Addr;
- TCUD CUD;
- TCUG CUG;
- } TDTEaddr;
-
-
-
- /*
- * Subnet independent address format
- */
- typedef struct {
- unsigned char len; /* In Semi Octets (0 means no SNPA address) */
- unsigned char addr[]; /* Defined by Subnet Specific Address Format */
- } TSNPA;
-
-
- /*
- * Subnet Specific Address Format
- */
- typedef union {
- TSNPA snpa;
- TMACaddr MACaddr;
- TDTEaddr DTEaddr;
- } TSSAF;
-
-
-
-
- /*
- * T S A P ( T r a n s p o r t S e r v i c e A c c e s s P o i n t )
- */
-
- typedef struct {
- TTSEL tsel;
- TNSAP nsap; /* Optional */
- TSSAF ssaf; /* Optional */
- } TTSAP;
-
- #endif